<template>
  <div class="qa-wrap">
    <van-tabs color="#00a895">
      <van-tab title="问答">
        <classify-search></classify-search>
        <search-nav @switchNav="switchNav"></search-nav>
        <classify-table></classify-table>
      </van-tab>
      <van-tab title="排行">
        <img class="ask-question" :src="`${$baseImgUrl}qa/ask_question.jpg`">
        <user-info></user-info>
        <question-star></question-star>
        <qa-honour></qa-honour>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import ClassifySearch from './components/ClassifySearch.vue';
import SearchNav from './components/SearchNav.vue';
import ClassifyTable from './components/Table.vue';
import UserInfo from './components/UserInfo.vue';
import QuestionStar from './components/QuestionStar.vue';
import QaHonour from './components/Honour.vue';

export default {
  name: 'QA',
  components: {
    ClassifySearch,
    SearchNav,
    ClassifyTable,
    UserInfo,
    QuestionStar,
    QaHonour
  },
  methods: {
    switchNav(keyword) {
      console.log(keyword);
    }
  }
};
</script>

<style lang="less" scoped>
  .qa-wrap {
    /deep/ .van-tabs__content {
      margin-top: .5rem;
    }

    .ask-question {
      width: 100%;
    }
  }
</style>
